package com.tobestronger.shouxiespringframework.beans;

import java.util.Objects;

/**
 * Bean 属性信息
 */
public class PropertyValue {

    /**
     * 属性名称
     */
    private final String name;

    /**
     * 属性值
     */
    private final Object value;

    public PropertyValue(String name, Object value) {
        this.name = name;
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if(!(o instanceof PropertyValue)){
            return false;
        }

        return this.name.equals( ((PropertyValue) o).getName() );
    }

    public String getName() {
        return name;
    }

    public Object getValue() {
        return value;
    }


}
